'''
Created on May 19, 2010

@author: varun
'''
import unittest
from model.song import Song


class Test(unittest.TestCase):


    def test_toJson(self):
        song = Song('Everynight in my dreams', 'Celine Dion', 'Titanic')
        self.assertEqual('{title: "Everynight in my dreams", artist: "Celine Dion", album: "Titanic"}', song.toJson())

    def test_toJson_removes_html_chars(self):
        song = Song('Everynight in my dreams', 'Celine Dion', '<Titanic>')
        self.assertEqual('{title: "Everynight in my dreams", artist: "Celine Dion", album: "Titanic"}', song.toJson())

if __name__ == "__main__":
    #import sys;sys.argv = ['', 'Test.testToJson']
    unittest.main()